/** 自动注册该文件夹下的设置了name的vue文件为全局组件 */
import { createApp } from "vue";

const app = createApp({});
const modules = import.meta.glob("./**/*.vue", { eager: true });

Object.entries(modules).forEach(([path, module]) => {
  const component = module.default;
  if (component.name) {
    app.component(component.name, component);
  }
});

app.mount("#app");
